<!DOCTYPE html>
<html lang=en>
<head>
  <meta charset="utf-8">
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-transform" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="format-detection" content="telephone=no,email=no,adress=no">
  <!-- Color theme for statusbar -->
  <meta name="theme-color" content="#000000" />
  <!-- 强制页面在当前窗口以独立页面显示,防止别人在框架里调用页面 -->
  <meta http-equiv="window-target" content="_top" />
  
  
  <title>Hexo</title>
  <meta name="description" content="esptool        直接复制的项目头文件找不到：  1      入门日志1234567891011121314151617181920212223242526272829#include &lt;stdio.h&gt;#include &lt;stdbool.h&gt;#include &quot;esp_log.h&quot;const char* tagtraffic &#x3D; &amp;quo">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo">
<meta property="og:url" content="https://gitee.com/yin-qiyu/myblog/2023/01/30/esp/esp-idf/ESP-IDF%E5%85%A5%E9%97%A8/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="esptool        直接复制的项目头文件找不到：  1      入门日志1234567891011121314151617181920212223242526272829#include &lt;stdio.h&gt;#include &lt;stdbool.h&gt;#include &quot;esp_log.h&quot;const char* tagtraffic &#x3D; &amp;quo">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230130231712495.png">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230130231809625.png">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230216130831923.png">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230302231048767.png">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230302231126591.png">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230302231507302.png">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230312232628802.png">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230312234437713.png">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230316140254217.png">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230316170657209.png">
<meta property="og:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230402171947301.png">
<meta property="article:published_time" content="2023-01-30T15:16:38.946Z">
<meta property="article:modified_time" content="2023-04-02T09:29:01.993Z">
<meta property="article:author" content="John Doe">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230130231712495.png">
  <!-- Canonical links -->
  <link rel="canonical" href="https://gitee.com/yin-qiyu/myblog/2023/01/30/esp/esp-idf/ESP-IDF%E5%85%A5%E9%97%A8/index.html">
  
    <link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png" type="image/x-icon">
  
  
<link rel="stylesheet" href="/yin-qiyu/myblog/css/style.css">

  
  
  
  
<meta name="generator" content="Hexo 6.3.0"></head>


<body class="main-center" itemscope itemtype="http://schema.org/WebPage">
  <header class="header" itemscope itemtype="http://schema.org/WPHeader">
  <div class="slimContent">
    <div class="navbar-header">
      
      
      <div class="profile-block text-center">
        <a id="avatar" href="https://github.com/cofess" target="_blank">
          <img class="img-circle img-rotate" src="/yin-qiyu/myblog/images/avatar.jpg" width="200" height="200">
        </a>
        <h2 id="name" class="hidden-xs hidden-sm">昵称</h2>
        <h3 id="title" class="hidden-xs hidden-sm hidden-md">Web Developer &amp; Designer</h3>
        <small id="location" class="text-muted hidden-xs hidden-sm"><i class="icon icon-map-marker"></i> Shenzhen, China</small>
      </div>
      
      <div class="search" id="search-form-wrap">

    <form class="search-form sidebar-form">
        <div class="input-group">
            <input type="text" class="search-form-input form-control" placeholder="Search" />
            <span class="input-group-btn">
                <button type="submit" class="search-form-submit btn btn-flat" onclick="return false;"><i class="icon icon-search"></i></button>
            </span>
        </div>
    </form>
    <div class="ins-search">
  <div class="ins-search-mask"></div>
  <div class="ins-search-container">
    <div class="ins-input-wrapper">
      <input type="text" class="ins-search-input" placeholder="Type something..." x-webkit-speech />
      <button type="button" class="close ins-close ins-selectable" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    </div>
    <div class="ins-section-wrapper">
      <div class="ins-section-container"></div>
    </div>
  </div>
</div>


</div>
      <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>
    <nav id="main-navbar" class="collapse navbar-collapse" itemscope itemtype="http://schema.org/SiteNavigationElement" role="navigation">
      <ul class="nav navbar-nav main-nav ">
        
        
        <li class="menu-item menu-item-home">
          <a href="/yin-qiyu/myblog/.">
            
            <i class="icon icon-home-fill"></i>
            
            <span class="menu-title">Home</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-archives">
          <a href="/yin-qiyu/myblog/archives">
            
            <i class="icon icon-archives-fill"></i>
            
            <span class="menu-title">Archives</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-categories">
          <a href="/yin-qiyu/myblog/categories">
            
            <i class="icon icon-folder"></i>
            
            <span class="menu-title">Categories</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-tags">
          <a href="/yin-qiyu/myblog/tags">
            
            <i class="icon icon-tags"></i>
            
            <span class="menu-title">Tags</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-repository">
          <a href="/yin-qiyu/myblog/repository">
            
            <i class="icon icon-project"></i>
            
            <span class="menu-title">Repository</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-books">
          <a href="/yin-qiyu/myblog/books">
            
            <i class="icon icon-book-fill"></i>
            
            <span class="menu-title">Books</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-links">
          <a href="/yin-qiyu/myblog/links">
            
            <i class="icon icon-friendship"></i>
            
            <span class="menu-title">Links</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-about">
          <a href="/yin-qiyu/myblog/about">
            
            <i class="icon icon-cup-fill"></i>
            
            <span class="menu-title">About</span>
          </a>
        </li>
        
      </ul>
      
	
    <ul class="social-links">
    	
        <li><a href="https://github.com/cofess" target="_blank" title="Github" data-toggle=tooltip data-placement=top><i class="icon icon-github"></i></a></li>
        
        <li><a href="http://weibo.com/cofess" target="_blank" title="Weibo" data-toggle=tooltip data-placement=top><i class="icon icon-weibo"></i></a></li>
        
        <li><a href="https://twitter.com/iwebued" target="_blank" title="Twitter" data-toggle=tooltip data-placement=top><i class="icon icon-twitter"></i></a></li>
        
        <li><a href="https://www.behance.net/cofess" target="_blank" title="Behance" data-toggle=tooltip data-placement=top><i class="icon icon-behance"></i></a></li>
        
        <li><a href="/yin-qiyu/myblog/atom.xml" target="_blank" title="Rss" data-toggle=tooltip data-placement=top><i class="icon icon-rss"></i></a></li>
        
    </ul>

    </nav>
  </div>
</header>

  
    <aside class="sidebar" itemscope itemtype="http://schema.org/WPSideBar">
  <div class="slimContent">
    
      <div class="widget">
    <h3 class="widget-title">Board</h3>
    <div class="widget-body">
        <div id="board">
            <div class="content">
                <p>欢迎交流与分享经验!</p>
            </div>
        </div>
    </div>
</div>

    
      

    
      

    
      
    
      
  <div class="widget">
    <h3 class="widget-title">Archive</h3>
    <div class="widget-body">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/yin-qiyu/myblog/archives/2023/07/">July 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/yin-qiyu/myblog/archives/2023/04/">April 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/yin-qiyu/myblog/archives/2023/03/">March 2023</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/yin-qiyu/myblog/archives/2023/02/">February 2023</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/yin-qiyu/myblog/archives/2023/01/">January 2023</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/yin-qiyu/myblog/archives/2022/04/">April 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/yin-qiyu/myblog/archives/2022/03/">March 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/yin-qiyu/myblog/archives/2022/02/">February 2022</a><span class="archive-list-count">7</span></li></ul>
    </div>
  </div>


    
      
  <div class="widget">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget-body">
      <ul class="recent-post-list list-unstyled no-thumbnail">
        
          <li>
            
            <div class="item-inner">
              <p class="item-category">
                
              </p>
              <p class="item-title">
                <a href="/yin-qiyu/myblog/2023/07/13/hello-world/" class="title">Hello World</a>
              </p>
              <p class="item-date">
                <time datetime="2023-07-13T14:49:10.957Z" itemprop="datePublished">2023-07-13</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-inner">
              <p class="item-category">
                
              </p>
              <p class="item-title">
                <a href="/yin-qiyu/myblog/2023/04/04/FreeRTOS/lonely_binary/" class="title">(no title)</a>
              </p>
              <p class="item-date">
                <time datetime="2023-04-04T06:56:35.461Z" itemprop="datePublished">2023-04-04</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-inner">
              <p class="item-category">
                
              </p>
              <p class="item-title">
                <a href="/yin-qiyu/myblog/2023/03/16/esp/esp-idf/issue/" class="title">(no title)</a>
              </p>
              <p class="item-date">
                <time datetime="2023-03-16T06:02:58.279Z" itemprop="datePublished">2023-03-16</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-inner">
              <p class="item-category">
                
              </p>
              <p class="item-title">
                <a href="/yin-qiyu/myblog/2023/02/26/%E5%A2%A8%E6%B0%B4%E5%B1%8F/Untitled/" class="title">(no title)</a>
              </p>
              <p class="item-date">
                <time datetime="2023-02-25T17:10:25.099Z" itemprop="datePublished">2023-02-26</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-inner">
              <p class="item-category">
                
              </p>
              <p class="item-title">
                <a href="/yin-qiyu/myblog/2023/02/02/%E5%A2%A8%E6%B0%B4%E5%B1%8F/epaper/" class="title">(no title)</a>
              </p>
              <p class="item-date">
                <time datetime="2023-02-02T05:54:50.611Z" itemprop="datePublished">2023-02-02</time>
              </p>
            </div>
          </li>
          
      </ul>
    </div>
  </div>
  

    
  </div>
</aside>

  
  
<main class="main" role="main">
  <div class="content">
  <article id="post-esp/esp-idf/ESP-IDF入门" class="article article-type-post" itemscope itemtype="http://schema.org/BlogPosting">
    
    <div class="article-header">
      
      <div class="article-meta">
        <span class="article-date">
    <i class="icon icon-calendar-check"></i>
	<a href="/yin-qiyu/myblog/2023/01/30/esp/esp-idf/ESP-IDF%E5%85%A5%E9%97%A8/" class="article-date">
	  <time datetime="2023-01-30T15:16:38.946Z" itemprop="datePublished">2023-01-30</time>
	</a>
</span>
        
        

        

        <span class="post-comment"><i class="icon icon-comment"></i> <a href="/yin-qiyu/myblog/2023/01/30/esp/esp-idf/ESP-IDF%E5%85%A5%E9%97%A8/#comments" class="article-comment-link">Comments</a></span>
        
      </div>
    </div>
    <div class="article-entry marked-body" itemprop="articleBody">
      
        <h1 id="esptool"><a href="#esptool" class="headerlink" title="esptool"></a>esptool</h1><img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230130231712495.png" alt="image-20230130231712495" style="zoom: 50%;" />

<img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230130231809625.png" alt="image-20230130231809625" style="zoom: 45%;" />





<p>直接复制的项目头文件找不到：</p>
<p><img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230216130831923.png" alt="image-20230216130831923"></p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"></span><br></pre></td></tr></table></figure>





<h1 id="入门"><a href="#入门" class="headerlink" title="入门"></a>入门</h1><h2 id="日志"><a href="#日志" class="headerlink" title="日志"></a>日志</h2><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdbool.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;esp_log.h&quot;</span></span></span><br><span class="line"></span><br><span class="line"><span class="type">const</span> <span class="type">char</span>* tagtraffic = <span class="string">&quot;交通灯&quot;</span>;</span><br><span class="line"></span><br><span class="line"><span class="type">bool</span> secretLog = <span class="literal">true</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">app_main</span><span class="params">(<span class="type">void</span>)</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">    <span class="keyword">if</span>(secretLog == <span class="literal">true</span> )&#123;</span><br><span class="line">        <span class="built_in">esp_log_level_set</span>(tagtraffic, ESP_LOG_VERBOSE);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="built_in">ESP_LOGE</span>(tagtraffic,<span class="string">&quot;不亮了&quot;</span>);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="built_in">ESP_LOGW</span>(tagtraffic,<span class="string">&quot;不亮了，寿命还有%i%%&quot;</span>,<span class="number">5</span>);</span><br><span class="line"></span><br><span class="line">    <span class="built_in">ESP_LOGI</span>(tagtraffic,<span class="string">&quot;不亮了,寿命还有%i%%&quot;</span>,<span class="number">75</span>);</span><br><span class="line"></span><br><span class="line">    <span class="built_in">ESP_LOGD</span>(tagtraffic,<span class="string">&quot;不亮了&quot;</span>);</span><br><span class="line"></span><br><span class="line">    <span class="built_in">ESP_LOGV</span>(tagtraffic,<span class="string">&quot;不亮了&quot;</span>);</span><br><span class="line"></span><br><span class="line">    <span class="comment">// ESP_LOGE(&quot;交通灯&quot;,&quot;不亮了&quot;);</span></span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230302231048767.png" alt="image-20230302231048767" style="zoom:50%;" />



<p>menuconfig中搜索log 可以看到info以上的信息都可以被显示出来</p>
<img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230302231126591.png" alt="image-20230302231126591" style="zoom: 33%;" />

<p>开到verbose后</p>
<img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230302231507302.png" alt="image-20230302231507302" style="zoom:33%;" />





<h3 id="提升log等级"><a href="#提升log等级" class="headerlink" title="提升log等级"></a>提升log等级</h3><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;esp_log.h&quot;</span></span></span><br><span class="line"></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;freertos/FreeRTOS.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;freertos/task.h&quot;</span></span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="type">static</span> <span class="type">char</span>* level1 = <span class="string">&quot;abc&quot;</span>;</span><br><span class="line"><span class="type">static</span> <span class="type">char</span>* level1 = <span class="string">&quot;abc&quot;</span>;</span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">app_main</span><span class="params">(<span class="type">void</span>)</span></span>&#123;</span><br><span class="line">  <span class="built_in">esp_log_level_set</span>(level1,ESP_LOG_DEBUG);</span><br><span class="line">  <span class="built_in">ESP_LOGD</span>(level1,<span class="string">&quot;TEST11&quot;</span>);</span><br><span class="line">  <span class="built_in">ESP_LOGD</span>(level2,<span class="string">&quot;TEST12&quot;</span>);</span><br><span class="line">  </span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>







<h2 id="循环"><a href="#循环" class="headerlink" title="循环"></a>循环</h2><p>默认一个tick是100ms</p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//1000个 ticks  = 10000ms</span></span><br><span class="line"><span class="comment">//1个ticks = 10ms</span></span><br><span class="line"><span class="comment">//1s  = 100ticks</span></span><br><span class="line"><span class="comment">//vTaskDelay(100);</span></span><br></pre></td></tr></table></figure>

<p>测试结果delay100为10000ms也就是10s</p>
<p><img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230312232628802.png" alt="image-20230312232628802"></p>
<p>在menuconfig中修改tick为1000</p>
<p>那么1s就是1000ms&#x2F;周期(1000) &#x3D; 1</p>
<p><img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230312234437713.png" alt="image-20230312234437713"></p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;esp_log.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;freertos/FreeRTOS.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;freertos/task.h&quot;</span></span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="type">int</span> count = <span class="number">0</span>;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">app_main</span><span class="params">(<span class="type">void</span>)</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">    count = <span class="number">100</span>;</span><br><span class="line">    <span class="built_in">ESP_LOGI</span>(<span class="string">&quot;counter&quot;</span>,<span class="string">&quot;ticks(ms):%ld&quot;</span>,portTICK_PERIOD_MS);</span><br><span class="line">    <span class="keyword">while</span>(<span class="number">1</span>)&#123;</span><br><span class="line">        <span class="built_in">ESP_LOGI</span>(<span class="string">&quot;COUNTER&quot;</span>,<span class="string">&quot;count value is  %d&quot;</span>,count);</span><br><span class="line">        count++;</span><br><span class="line">        <span class="comment">//1000个 ticks  = 10000ms</span></span><br><span class="line">        <span class="comment">//1个ticks = 10ms</span></span><br><span class="line">        <span class="comment">//1s  = 100ticks</span></span><br><span class="line">        <span class="comment">//vTaskDelay(100);</span></span><br><span class="line">        <span class="built_in">vTaskDelay</span>(<span class="number">1000</span>/portTICK_PERIOD_MS);</span><br><span class="line">        </span><br><span class="line">        </span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>







<h2 id="看门狗"><a href="#看门狗" class="headerlink" title="看门狗"></a>看门狗</h2><blockquote>
<p><a target="_blank" rel="noopener" href="https://docs.espressif.com/projects/esp-idf/en/v5.0/esp32/api-reference/system/freertos.html?highlight=vtasklist#_CPPv49vTaskListPc">FreeRTOS - ESP32 - — ESP-IDF 编程指南 v5.0 文档 (espressif.com)</a></p>
</blockquote>
<p><img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230316140254217.png" alt="image-20230316140254217"></p>
<h2 id="blink"><a href="#blink" class="headerlink" title="blink"></a>blink</h2><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;driver/gpio.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;freertos/freeRTOS.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;freertos/task.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;esp_log.h&quot;</span></span></span><br><span class="line"></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> LED_R GPIO_NUM_12</span></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> LED_L GPIO_NUM_13</span></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> DELAY_MS 2000</span></span><br><span class="line"></span><br><span class="line"><span class="type">uint32_t</span>  status = <span class="number">0</span>;</span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">app_main</span><span class="params">(<span class="type">void</span>)</span></span>&#123;</span><br><span class="line">    </span><br><span class="line"></span><br><span class="line">    <span class="built_in">gpio_reset_pin</span>(LED_R);</span><br><span class="line">    <span class="built_in">gpio_reset_pin</span>(LED_L);</span><br><span class="line">    <span class="built_in">gpio_set_direction</span>(LED_R,GPIO_MODE_OUTPUT);</span><br><span class="line">    <span class="built_in">gpio_set_direction</span>(LED_L,GPIO_MODE_OUTPUT);</span><br><span class="line"></span><br><span class="line">    <span class="built_in">ESP_LOGI</span>(<span class="string">&quot;blink&quot;</span>,<span class="string">&quot;GPIO:%d、%d&quot;</span>,LED_R,LED_L);</span><br><span class="line">    <span class="built_in">ESP_LOGI</span>(<span class="string">&quot;blink&quot;</span>,<span class="string">&quot;delay:%d(ms)&quot;</span>,DELAY_MS);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">while</span> (<span class="number">1</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        status = !status;</span><br><span class="line">        <span class="built_in">gpio_set_level</span>(LED_R,status);</span><br><span class="line">        <span class="built_in">gpio_set_level</span>(LED_L,!status);</span><br><span class="line">        </span><br><span class="line">        <span class="built_in">vTaskDelay</span>(DELAY_MS/portTICK_PERIOD_MS);</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line">    </span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>





<h2 id="menuconfig"><a href="#menuconfig" class="headerlink" title="menuconfig"></a>menuconfig</h2><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;driver/gpio.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;freertos/freeRTOS.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;freertos/task.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span><span class="string">&quot;esp_log.h&quot;</span></span></span><br><span class="line"></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> LED_R CONFIG_LED_GPIO_NUM</span></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> DELAY_MS CONFIG_delay</span></span><br><span class="line"></span><br><span class="line"><span class="type">uint32_t</span>  status = <span class="number">0</span>;</span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">app_main</span><span class="params">(<span class="type">void</span>)</span></span>&#123;</span><br><span class="line">    </span><br><span class="line"></span><br><span class="line">    <span class="built_in">gpio_reset_pin</span>(LED_R);</span><br><span class="line"></span><br><span class="line">    <span class="built_in">gpio_set_direction</span>(LED_R,GPIO_MODE_OUTPUT);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="built_in">ESP_LOGI</span>(<span class="string">&quot;blink&quot;</span>,<span class="string">&quot;GPIO:%d&quot;</span>,LED_R);</span><br><span class="line">    <span class="built_in">ESP_LOGI</span>(<span class="string">&quot;blink&quot;</span>,<span class="string">&quot;delay:%d(ms)&quot;</span>,DELAY_MS);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">while</span> (<span class="number">1</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        status = !status;</span><br><span class="line">        <span class="built_in">gpio_set_level</span>(LED_R,status);</span><br><span class="line"></span><br><span class="line">        </span><br><span class="line">        <span class="built_in">vTaskDelay</span>(DELAY_MS/portTICK_PERIOD_MS);</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230316170657209.png" alt="image-20230316170657209" style="zoom:100%;" />





<h2 id="完结"><a href="#完结" class="headerlink" title="完结"></a>完结</h2><h1 id="nvs"><a href="#nvs" class="headerlink" title="nvs"></a>nvs</h1><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;nvs_flash.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;esp_log.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;freertos/FreeRTOS.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;freertos/task.h&quot;</span></span></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">app_main</span><span class="params">(<span class="type">void</span>)</span></span></span><br><span class="line"><span class="function"></span>&#123;   </span><br><span class="line">    <span class="built_in">vTaskDelay</span>(<span class="number">2000</span>/portTICK_PERIOD_MS);</span><br><span class="line">    <span class="type">char</span> * blbl_name_space = <span class="string">&quot;blblyqy&quot;</span>;</span><br><span class="line"></span><br><span class="line">    <span class="built_in">nvs_flash_init</span>();</span><br><span class="line">    <span class="type">nvs_handle_t</span> blbl_handle;</span><br><span class="line">    <span class="built_in">nvs_open</span>(blbl_name_space,NVS_READWRITE,&amp;blbl_handle);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//read</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">//write</span></span><br><span class="line"></span><br><span class="line">    <span class="type">uint32_t</span> count_value = <span class="number">0</span>;</span><br><span class="line">    <span class="type">char</span> * counter_key = <span class="string">&quot;counter&quot;</span>;</span><br><span class="line">    <span class="built_in">nvs_get_u32</span>(blbl_handle,counter_key,&amp;count_value);</span><br><span class="line">    <span class="built_in">ESP_LOGI</span>(<span class="string">&quot;NVS&quot;</span>,<span class="string">&quot;key:value %s:%ld&quot;</span>,counter_key,count_value);</span><br><span class="line"></span><br><span class="line">    <span class="comment">//count_value = count_value + 1;</span></span><br><span class="line">    <span class="comment">//count_value++;</span></span><br><span class="line">    <span class="built_in">nvs_set_u32</span>(blbl_handle,counter_key,++count_value);</span><br><span class="line"></span><br><span class="line">    <span class="built_in">nvs_close</span>(blbl_handle);</span><br><span class="line">    <span class="built_in">nvs_flash_deinit</span>();</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h2 id="清除nvs（nvs放在flash上）"><a href="#清除nvs（nvs放在flash上）" class="headerlink" title="清除nvs（nvs放在flash上）"></a>清除nvs（nvs放在flash上）</h2><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line">(base) yinqiyu@MBP nvs_learn % idf.py erase-flash</span><br><span class="line">Executing action: erase-flash</span><br><span class="line">Serial port /dev/cu.wchusbserial553C0160971</span><br><span class="line">Connecting....</span><br><span class="line">Detecting chip type... ESP32-S3</span><br><span class="line">Running esptool.py in directory /Users/yinqiyu/esp/Project/nvs_learn/build</span><br><span class="line">Executing <span class="string">&quot;/Users/yinqiyu/.espressif/python_env/idf5.1_py3.9_env/bin/python /Users/yinqiyu/esp/esp-idf/components/esptool_py/esptool/esptool.py -p /dev/cu.wchusbserial553C0160971 -b 460800 --before default_reset --after hard_reset --chip esp32s3 erase_flash&quot;</span>...</span><br><span class="line">esptool.py v4<span class="number">.5</span></span><br><span class="line">Serial port /dev/cu.wchusbserial553C0160971</span><br><span class="line">Connecting....</span><br><span class="line">Chip is ESP32-<span class="built_in">S3</span> (revision v0<span class="number">.1</span>)</span><br><span class="line">Features: WiFi, BLE</span><br><span class="line">Crystal is <span class="number">40</span>MHz</span><br><span class="line">MAC: <span class="number">7</span>c:df:a1:fa:<span class="number">0f</span>:b4</span><br><span class="line">Uploading stub...</span><br><span class="line">Running stub...</span><br><span class="line">Stub running...</span><br><span class="line">Changing baud rate to <span class="number">460800</span></span><br><span class="line">Changed.</span><br><span class="line"><span class="function">Erasing <span class="title">flash</span> <span class="params">(<span class="keyword">this</span> may take a <span class="keyword">while</span>)</span>...</span></span><br><span class="line"><span class="function">Chip erase completed successfully in 6.1s</span></span><br><span class="line"><span class="function">Hard resetting via RTS pin...</span></span><br><span class="line"><span class="function">Done</span></span><br></pre></td></tr></table></figure>



<h2 id="nvs-blob"><a href="#nvs-blob" class="headerlink" title="nvs_blob"></a>nvs_blob</h2><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;string.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;nvs_flash.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;esp_log.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;freertos/FreeRTOS.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;freertos/task.h&quot;</span></span></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">app_main</span><span class="params">(<span class="type">void</span>)</span></span></span><br><span class="line"><span class="function"></span>&#123;   </span><br><span class="line">    <span class="built_in">vTaskDelay</span>(<span class="number">2000</span>/portTICK_PERIOD_MS);</span><br><span class="line">    <span class="type">char</span> * blbl_name_space = <span class="string">&quot;blblyqy&quot;</span>;</span><br><span class="line"></span><br><span class="line">    <span class="built_in">nvs_flash_init</span>();</span><br><span class="line">    <span class="type">nvs_handle_t</span> blbl_handle;</span><br><span class="line">    <span class="built_in">nvs_open</span>(blbl_name_space,NVS_READWRITE,&amp;blbl_handle);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="type">uint32_t</span> max_ap = <span class="number">2</span>;</span><br><span class="line">    <span class="keyword">typedef</span> <span class="keyword">struct</span> <span class="title class_">AP</span></span><br><span class="line">    &#123;</span><br><span class="line">        <span class="type">char</span> ssid[<span class="number">50</span>];</span><br><span class="line">        <span class="type">char</span> pswd[<span class="number">50</span>];</span><br><span class="line">    &#125;<span class="type">ap_t</span>;</span><br><span class="line">    <span class="type">ap_t</span> aps_set[max_ap];</span><br><span class="line"></span><br><span class="line">    <span class="keyword">for</span> (<span class="type">int</span> i = <span class="number">0</span>; i &lt; max_ap; i++)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="built_in">strcpy</span>(aps_set[i].ssid,<span class="string">&quot;bilibili&quot;</span>);</span><br><span class="line">        <span class="built_in">strcpy</span>(aps_set[i].pswd,<span class="string">&quot;123123&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="built_in">nvs_set_blob</span>(blbl_handle,<span class="string">&quot;aps&quot;</span>,aps_set,<span class="built_in">sizeof</span>(aps_set));</span><br><span class="line">    </span><br><span class="line">    <span class="type">ap_t</span> aps_get[max_ap];</span><br><span class="line">    <span class="type">size_t</span> length = <span class="built_in">sizeof</span>(aps_get);</span><br><span class="line">    <span class="built_in">nvs_get_blob</span>(blbl_handle,<span class="string">&quot;aps&quot;</span>,aps_set,&amp;length);</span><br><span class="line">    </span><br><span class="line">    <span class="keyword">for</span> (<span class="type">int</span> i = <span class="number">0</span>; i &lt; max_ap; i++)</span><br><span class="line">    &#123;   </span><br><span class="line">        <span class="built_in">ESP_LOGI</span>(<span class="string">&quot;nvs&quot;</span>,<span class="string">&quot;ssid:passwd %s:%s&quot;</span>,aps_set[i].ssid,aps_set[i].pswd);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">//read</span></span><br><span class="line">    <span class="comment">//write</span></span><br><span class="line">    <span class="comment">// uint32_t count_value = 0;</span></span><br><span class="line">    <span class="comment">// char * counter_key = &quot;counter&quot;;</span></span><br><span class="line">    <span class="comment">// nvs_get_u32(blbl_handle,counter_key,&amp;count_value);</span></span><br><span class="line">    <span class="comment">// ESP_LOGI(&quot;NVS&quot;,&quot;key:value %s:%ld&quot;,counter_key,count_value);</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">//count_value = count_value + 1;</span></span><br><span class="line">    <span class="comment">//count_value++;</span></span><br><span class="line">    <span class="comment">// nvs_set_u32(blbl_handle,counter_key,++count_value);</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="built_in">nvs_commit</span>(blbl_handle);</span><br><span class="line">    <span class="built_in">nvs_close</span>(blbl_handle);</span><br><span class="line">    <span class="built_in">nvs_flash_deinit</span>();</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h2 id="声明和初始化"><a href="#声明和初始化" class="headerlink" title="声明和初始化"></a>声明和初始化</h2><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="type">ap_t</span> aps_set[max_ap];</span><br><span class="line">   <span class="built_in">printMemory</span>((<span class="type">unsigned</span> <span class="type">char</span> *)aps_set, <span class="built_in">sizeof</span>(aps_set));</span><br><span class="line">   <span class="built_in">memset</span>(aps_set, <span class="number">0</span>, <span class="built_in">sizeof</span>(aps_set)); <span class="comment">// 将aps_set数组全部设为0</span></span><br><span class="line">   <span class="built_in">printMemory</span>((<span class="type">unsigned</span> <span class="type">char</span> *)aps_set, <span class="built_in">sizeof</span>(aps_set));</span><br></pre></td></tr></table></figure>

<p><img src="https://yqypicbed.oss-cn-hangzhou.aliyuncs.com/typoraoss/image-20230402171947301.png" alt="image-20230402171947301"></p>

      
    </div>
    <div class="article-footer">
      <blockquote class="mt-2x">
  <ul class="post-copyright list-unstyled">
    
    <li class="post-copyright-link hidden-xs">
      <strong>本文链接：</strong>
      <a href="https://gitee.com/yin-qiyu/myblog/2023/01/30/esp/esp-idf/ESP-IDF%E5%85%A5%E9%97%A8/" title="" target="_blank" rel="external">https://gitee.com/yin-qiyu/myblog/2023/01/30/esp/esp-idf/ESP-IDF入门/</a>
    </li>
    
    <li class="post-copyright-license">
      <strong>版权声明： </strong> 本博客所有文章除特别声明外，均采用 <a href="http://creativecommons.org/licenses/by/4.0/deed.zh" target="_blank" rel="external">CC BY 4.0 CN协议</a> 许可协议。转载请注明出处！
    </li>
  </ul>
</blockquote>


<div class="panel panel-default panel-badger">
  <div class="panel-body">
    <figure class="media">
      <div class="media-left">
        <a href="https://github.com/cofess" target="_blank" class="img-burn thumb-sm visible-lg">
          <img src="/yin-qiyu/myblog/images/avatar.jpg" class="img-rounded w-full" alt="">
        </a>
      </div>
      <div class="media-body">
        <h3 class="media-heading"><a href="https://github.com/cofess" target="_blank"><span class="text-dark">昵称</span><small class="ml-1x">Web Developer &amp; Designer</small></a></h3>
        <div>个人简介。</div>
      </div>
    </figure>
  </div>
</div>


    </div>
  </article>
  
    
  <section id="comments">
  	
      <div id="vcomments"></div>
    
  </section>


  
</div>

  <nav class="bar bar-footer clearfix" data-stick-bottom>
  <div class="bar-inner">
  
  <ul class="pager pull-left">
    
    <li class="prev">
      <a href="/yin-qiyu/myblog/2023/02/02/%E5%A2%A8%E6%B0%B4%E5%B1%8F/epaper/" title="(no title)"><i class="icon icon-angle-left" aria-hidden="true"></i><span>&nbsp;&nbsp;Newer</span></a>
    </li>
    
    
    <li class="next">
      <a href="/yin-qiyu/myblog/2023/01/14/esp/esp8266/Untitled/" title="(no title)"><span>Older&nbsp;&nbsp;</span><i class="icon icon-angle-right" aria-hidden="true"></i></a>
    </li>
    
    
  </ul>
  
  
  <!-- Button trigger modal -->
  <button type="button" class="btn btn-fancy btn-donate pop-onhover bg-gradient-warning" data-toggle="modal" data-target="#donateModal"><span>$</span></button>
  <!-- <div class="wave-icon wave-icon-danger btn-donate" data-toggle="modal" data-target="#donateModal">
    <div class="wave-circle"><span class="icon"><i class="icon icon-bill"></i></span></div>
  </div> -->
  
  
  <div class="bar-right">
    
    <div class="share-component" data-sites="weibo,qq,wechat,facebook,twitter" data-mobile-sites="weibo,qq,qzone"></div>
    
  </div>
  </div>
</nav>
  
<!-- Modal -->
<div class="modal modal-center modal-small modal-xs-full fade" id="donateModal" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document">
    <div class="modal-content donate">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      <div class="modal-body">
        <div class="donate-box">
          <div class="donate-head">
            <p>Maybe you could buy me a cup of coffee.</p>
          </div>
          <div class="tab-content">
            <div role="tabpanel" class="tab-pane fade active in" id="alipay">
              <div class="donate-payimg">
                <img src="/yin-qiyu/myblog/images/donate/alipayimg.png" alt="Scan Qrcode" title="Scan" />
              </div>
              <p class="text-muted mv">Scan this qrcode</p>
              <p class="text-grey">Open alipay app scan this qrcode, buy me a coffee!</p>
            </div>
            <div role="tabpanel" class="tab-pane fade" id="wechatpay">
              <div class="donate-payimg">
                <img src="/yin-qiyu/myblog/images/donate/wechatpayimg.png" alt="Scan Qrcode" title="Scan" />
              </div>
              <p class="text-muted mv">Scan this qrcode</p>
              <p class="text-grey">Open wechat app scan this qrcode, buy me a coffee!</p>
            </div>
          </div>
          <div class="donate-footer">
            <ul class="nav nav-tabs nav-justified" role="tablist">
              <li role="presentation" class="active">
                <a href="#alipay" id="alipay-tab" role="tab" data-toggle="tab" aria-controls="alipay" aria-expanded="true"><i class="icon icon-alipay"></i> alipay</a>
              </li>
              <li role="presentation" class="">
                <a href="#wechatpay" role="tab" id="wechatpay-tab" data-toggle="tab" aria-controls="wechatpay" aria-expanded="false"><i class="icon icon-wepay"></i> wechat payment</a>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>



</main>

  <footer class="footer" itemscope itemtype="http://schema.org/WPFooter">
	
	
    <ul class="social-links">
    	
        <li><a href="https://github.com/cofess" target="_blank" title="Github" data-toggle=tooltip data-placement=top><i class="icon icon-github"></i></a></li>
        
        <li><a href="http://weibo.com/cofess" target="_blank" title="Weibo" data-toggle=tooltip data-placement=top><i class="icon icon-weibo"></i></a></li>
        
        <li><a href="https://twitter.com/iwebued" target="_blank" title="Twitter" data-toggle=tooltip data-placement=top><i class="icon icon-twitter"></i></a></li>
        
        <li><a href="https://www.behance.net/cofess" target="_blank" title="Behance" data-toggle=tooltip data-placement=top><i class="icon icon-behance"></i></a></li>
        
        <li><a href="/yin-qiyu/myblog/atom.xml" target="_blank" title="Rss" data-toggle=tooltip data-placement=top><i class="icon icon-rss"></i></a></li>
        
    </ul>

    <div class="copyright">
    	
        <div class="publishby">
        	Theme by <a href="https://github.com/cofess" target="_blank"> cofess </a>base on <a href="https://github.com/cofess/hexo-theme-pure" target="_blank">pure</a>.
        </div>
    </div>
</footer>
  <script src="//cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')
</script>

<script src="/yin-qiyu/myblog/js/plugin.min.js"></script>


<script src="/yin-qiyu/myblog/js/application.js"></script>


    <script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: 'Posts',
            PAGES: 'Pages',
            CATEGORIES: 'Categories',
            TAGS: 'Tags',
            UNTITLED: '(Untitled)',
        },
        ROOT_URL: '/yin-qiyu/myblog/',
        CONTENT_URL: '/yin-qiyu/myblog/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>

<script src="/yin-qiyu/myblog/js/insight.js"></script>






   




   
    
  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/valine"></script>
  <script type="text/javascript">
  var GUEST = ['nick', 'mail', 'link'];
  var meta = 'nick,mail,link';
  meta = meta.split(',').filter(function(item) {
    return GUEST.indexOf(item) > -1;
  });
  new Valine({
    el: '#vcomments',
    verify: false,
    notify: false,
    appId: '',
    appKey: '',
    placeholder: 'Just go go',
    avatar: 'mm',
    meta: meta,
    pageSize: '10' || 10,
    visitor: false
  });
  </script>

     







</body>
</html>